package com.fjl;

import com.fjl.service.TestService;
import org.springframework.context.ApplicationContext;
import org.springframework.context.annotation.AnnotationConfigApplicationContext;

public class TestSpring {
	public static void main(String[] args) {
//		ApplicationContext ac = new AnnotationConfigApplicationContext("com.fjl");
		ApplicationContext ac = new AnnotationConfigApplicationContext(ConfigApp.class);
		try {

			TestService bean = ac.getBean(TestService.class);
			bean.hello();

		} catch (Exception e) {
			e.printStackTrace();
		}
	}
}
